﻿
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;

using System.Data;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using System.Data.SqlClient;
using UtilsBase;

using Microsoft.AspNetCore.Http;

using System.Web;

using ServiceWeb.WebAdmin;
using AngleSharp.Dom;
using Models.Common;
using Models.JsonResultModel;
using UtilsORM;
using UtilsORM.MySqlData;
using Microsoft.EntityFrameworkCore;
using FileServer.Common;
using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;

namespace FileServer.Controllers
{
    [Route("api/[controller]/[action]")]
    public class MenuController : BaseMagerController
    {

       // [Authorize]
        public RespResultData getTopMenu(string parentGuid= null)
        {  // 获取用户ID
           // var userId = User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.NameIdentifier)?.Value;
           //读取菜单
            List<RespMenu> DtMenuList = new ServiceSystemMenu().GetListAll(parentGuid, LoginUserInfo);
            return RespResult.Sucess(DtMenuList);
        }
       
    }
}